#!/bin/csh -f
set tham=
set cmdl=($argv)
while ("$1" != "")
    switch ($1)
	default:
	    set tham=$1
	breaksw
    endsw
    shift
end
if($tham == "") then
    echo "Synopsis : thfit h1-h2-h3... where h* are object names"
    exit
endif
mkthinp $tham > thfit.inp
thfit_ > tham
threp | tee thfit.rep
set j=0
if(-f thfit.cmds) then
    set j = `wc -l thfit.cmds`
endif
@ j++
echo "$j thfit "$cmdl >> thfit.cmds
##
